{extend name="layout" /}
{block name="title"}文章列表{/block}
{block name="style"} <style>
    .layui-btn-small {
        padding: 0 15px;
    }

    .layui-form-checkbox {
        margin: 0;
    }

    tr td:not(:nth-child(0)),
    tr th:not(:nth-child(0)) {
        text-align: center;
    }

    #dataConsole {
        text-align: center;
    }
    /*分页页容量样式*/
    /*可选*/
    .layui-laypage {
        display: block;
    }

    /*可选*/
    .layui-laypage > * {
        float: left;
    }
    /*可选*/
    .layui-laypage .laypage-extend-pagesize {
        float: right;
    }
    /*可选*/
    .layui-laypage:after {
        content: ".";
        display: block;
        height: 0;
        clear: both;
        visibility: hidden;
    }

    /*必须*/
    .layui-laypage .laypage-extend-pagesize {
        height: 30px;
        line-height: 30px;
        margin: 0px;
        border: none;
        font-weight: 400;
    }
    /*分页页容量样式END*/
</style>{/block}
{block name="body"}
<fieldset id="dataConsole" class="layui-elem-field layui-field-title"  >
    <legend>控制台</legend>
    <div class="layui-field-box">
        <div id="articleIndexTop">
            <form class="layui-form layui-form-pane" action="">
                <div class="layui-form-item" style="margin:0;margin-top:15px;">
                    <div class="layui-inline">
                        <label class="layui-form-label">标签</label>
                        <div class="layui-input-inline">
                            <select name="label" lay-filter="formLabel">
                                <option value="0">全部分类</option>
                                {volist name="labels" id="type"}
                                <option value="{$key}">{$type}</option>
                                {/volist}
                            </select>
                        </div>
                        <label class="layui-form-label">关键词</label>
                        <div class="layui-input-inline">
                            <input type="text" name="key" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline" style="width:auto">
                            <button class="layui-btn" lay-submit lay-filter="formSearch">搜索</button>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline" style="width:auto">
                            <a id="addArticle" class="layui-btn layui-btn-normal" data-url="{:url('/admin/addArticle')}">发表文章</a>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</fieldset>
<fieldset id="dataList" class="layui-elem-field layui-field-title sys-list-field" >
    <legend style="text-align:center;">文章列表</legend>
    <div class="layui-field-box">
        <div id="dataContent" class="">
            <!--内容区域 ajax获取-->
        </div>
    </div>
</fieldset>
{/block}
{block name="script"}
<!-- layui规范化用法 -->
<script type="text/javascript">
    var type = "{$typeId}";
    layui.config({
        base: '__JS__/'
    }).use('artlist');
</script>
{/block}